package cn.minsh.lims.eoms.modules.app.controller.res;

import cn.minsh.lims.eoms.modules.app.entity.RepairOrderRecordEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * @author Administrator
 */
@Data
@ApiModel("维修工单详情")
public class RepairOrderInfoRes {

    @ApiModelProperty("id")
    private Long id = -1L;
    @ApiModelProperty("维修单号")
    private String code = "" ;
    @ApiModelProperty("状态：1未开始、2处理中、3已完成、4已关闭、5已拒绝")
    private Integer status = -1 ;
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime = null;
    @ApiModelProperty("修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime =null;
    @ApiModelProperty("当前登录人")
    private Long loginUserId ;
    @ApiModelProperty("问题概要")
    private String summary = "";
    @ApiModelProperty("问题描述")
    private String description = "";
    @ApiModelProperty("问题级别：1一般2严重3非常严重")
    private Integer level = -1;
    @ApiModelProperty("维修类型：1自主维修2委外维修")
    private Integer type = -1;
    @ApiModelProperty("供应商id")
    private Long supplierId = -1L;
    @ApiModelProperty("发起人")
    private Long createBy =-1L;
    @ApiModelProperty("设备id，设备id(Long)列表")
    private List<Long> equipmentIdList = null;
    @ApiModelProperty("现场图片")
    private List<String> picList=null ;
    @ApiModelProperty("经办人")
    private Long agentId =-1L;
    @ApiModelProperty("是否解决:0:未解决1已解决")
    private Integer isResolved =-1 ;
    @ApiModelProperty("维修日志")
    private List<OrderRecordRes> recordList =null;

    @Data
    @ApiModel("操作日志")
    public static class OrderRecordRes{

        @ApiModelProperty("操作人")
        private Long operatorId =-1L;
        @ApiModelProperty("操作时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
        private Date operatorTime = null;
        @ApiModelProperty("操作")
        private String operation = "";
        @ApiModelProperty("说明")
        private String explain = "";
        @ApiModelProperty("用户")
        private Long userId = -1L ;
    }
}
